-- GENERATED SPELL FOR [Dawnblade Marksman] --


function spell0_24979(pUnit, Event) --@Flaming Arrow,n/a--
pUnit:FullCastSpellOnTarget(45101,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24979', 3000, 1)
end

function spell1_24979(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(37847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24979', 1000, 1)
end

function spell2_24979(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24979', 651, 1)
end

function Sorts_24979(pUnit, Event)
local choix_sorts_24979 = math.random(0, 2)
if choix_sorts_24979 == 0 then
pUnit:RegisterEvent('spell0_24979', 1, 1)
end
if choix_sorts_24979 == 1 then
pUnit:RegisterEvent('spell1_24979', 1, 1)
end
if choix_sorts_24979 == 2 then
pUnit:RegisterEvent('spell2_24979', 1, 1)
end
end

function mob24979_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24979', math.random(1500, 3000), 1)
end

function mob24979_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24979_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24979_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24979, 1, 'mob24979_Action')
RegisterUnitEvent(24979, 2, 'mob24979_Leave')
RegisterUnitEvent(24979, 3, 'mob24979_Kill')
RegisterUnitEvent(24979, 4, 'mob24979_Die')
